#include <54func.h>
int main()
{
    //父进程提前终止，那么子进程就成为了孤儿进程
    if(fork())
    {
       // printf("I am parent!pid = %d,ppid = %d\n",getpid(),getppid());
       return 0;//父进程直接结束
    }else
    {
        //printf("I am child!pid = %d,ppid = %d\n",     getpid(),getppid());
        while(1)
        {
            sleep(1);
        }
    }
    return 0;
}
